<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>产品管理--编辑产品</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link href="/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/css/materialdesignicons.min.css" rel="stylesheet" />
    <link href="/css/animate.min.css" rel="stylesheet" />
    <link href="/css/style.min.css" rel="stylesheet" />
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css" />
    <link rel="stylesheet" href="/css/input_tags.css" />
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" />
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css" />
    <link rel="stylesheet" href="/css/input_tags.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/css/skin.css" />
</head>
<body>
<div class="container-fluid">
    <div class="card">
        <div class="card-header">
            <h1 id="title"></h1>
        </div>
        <div class="card-body">
            <form class="well form-well"  id="customerForm" autocomplete="off">
                <input type="hidden" id="customerProductId" name="customerProductId" th:value="${customerProductId}"/>
                <input type="hidden" id="tag" name="tag" th:value="${tag}"/>
                <div class="row">
                    <!--<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">产品分类</label>
                        <div class="form-content">
                            <select class="form-control" id="productCategoriesSelect" name="productCategoriesSelect" type="text" title="请选择">
                                <option value="0">非会员产品</option>
                                <option value="1">会员产品</option>
                            </select>
                        </div>
                    </div>-->
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">产品名称</label>
                        <div class="form-content">
                            <input type="hidden"  id="productNameHidden" name="productNameHidden">
                            <input type="text" class="form-control" id="productName" name="productName" placeholder="请输入产品名称" onchange="checkIsRepeatProductName()">
                        </div>
                    </div>
                    <!--<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">产品编码</label>
                        <div class="form-content">
                            <input type="hidden"  id="productCodeHidden" name="productCodeHidden">
                            <input type="text" class="form-control" id="productCode" name="productCode" placeholder="请输入产品编码" onchange="checkIsRepeatProductCode()">
                        </div>
                    </div>-->
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">服务分类</label>
                        <div class="form-content">
                            <input type="text" class="form-control" id="serviceClassification" name="serviceClassification" placeholder="请输入服务分类">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">产品原价</label>
                        <div class="form-content">
                            <input type="text" class="form-control" id="productOriginalPrice" name="productOriginalPrice" placeholder="请输入产品原价" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">产品单价</label>
                        <div class="form-content">
                            <input type="text" class="form-control" id="productUnitPrice" name="productUnitPrice" placeholder="请输入产品单价" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">业绩换算比例</label>
                        <div class="form-content">
                            <input type="text" class="form-control" id="performanceConversionRatio" name="performanceConversionRatio" placeholder="请输入业绩换算比例" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">产品会员价</label>
                        <div class="form-content">
                            <input type="text" class="form-control" id="productMemberPrice" name="productMemberPrice" placeholder="请输入产品会员价" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,4})?).*$/g, '$1')">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">专题ID</label>
                        <div class="form-content">
                            <input type="hidden"  id="topicIdHidden" name="topicIdHidden">
                            <input type="text" class="form-control" id="topicId" name="topicId" placeholder="请输入专题ID" oninput="value=value.replace(/[^\d]/g,'')" onchange="checkIsRepeatTopicId()">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">学习期数</label>
                        <div class="form-content">
                            <input type="text" class="form-control" id="studyPeriod" name="studyPeriod" placeholder="学习期数">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">兑换方式</label>
                        <div class="form-content">
                            <div class="input-group">
                                <select class="form-control" id="exchangeMethodSelect" name="exchangeMethodSelect" type="text" title="请选择"></select>
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showAddChange()">新增</button>
                                </span>
                            </div>
                        </div>
                    </div>
                    <!--<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">会员卡级别</label>
                        <div class="form-content">
                            <input type="text" class="form-control" id="membershipCardLevel" name="membershipCardLevel" placeholder="请输入会员卡级别">
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">会员发卡类型</label>
                        <div class="form-content">
                            <div class="input-group">
                                <select class="form-control" id="membershipCardTypeSelect" name="membershipCardTypeSelect" type="text" title="请选择"></select>
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button" onclick="showAddType()">新增</button>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                        <label class="control-label label-required">产品有效期</label>
                        <div class="form-content">
                            <input type="text" class="form-control" id="productPeriodValidity" name="productPeriodValidity">
                        </div>
                    </div>-->
                    <div class="col-xs-12">
                        <label class="control-label label-required">产品标签</label>
                        <div class="form-content">
                            <div id="productTagBox" name="productTagBox" class="tags-box form-control"></div>
                        </div>
                    </div>
                    <div class="col-xs-12">
                        <label class="control-label label-required">产品描述</label>
                        <div class="form-content">
                            <textarea class="form-control" id="productDesc" name="productDesc" rows="6" placeholder="请输入产品描述"></textarea>
                        </div>
                    </div>
                    <!--<div class="col-xs-12">
                        <label class="control-label label-required">产品说明</label>
                        <div class="form-content">
                            <textarea class="form-control" id="productManual" name="productManual" rows="6" placeholder="请输入产品说明"></textarea>
                        </div>
                    </div>-->
                </div>
            </form>
            <div class="form-actions">
                <button class="btn btn-primary btn-label" type="button" onclick="updateCustomerProduct()"><label><i class="mdi mdi-check"></i></label>提交</button>
                <button class="btn btn-default" type="button" onclick="formReset()">重置</button>
            </div>
        </div>
    </div>
</div>

<!-- 新增会员卡发卡类型弹窗 -->
<div class="modal fade" tabindex="-1" role="dialog" id="addMemberShipCardModel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4>新增会员发卡类型</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">会员发卡类型</label>
                        <div class="col-sm-8">
                            <input id="memberShipCard" name="memberShipCard" type="text" class="form-control" placeholder="请输入会员发卡类型">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <div class="btn btn-primary" onclick="addMemberShipCardType()">确定</div>
                <div class="btn btn-default" data-dismiss="modal" >取消</div>
            </div>
        </div>
    </div>
</div>
<!-- 新增兑换方式弹框 -->
<div class="modal fade" tabindex="-1" role="dialog" id="addExchangeMethodModel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4>新增兑换方式</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">兑换方式</label>
                        <div class="col-sm-8">
                            <input id="exchangeMethod" name="exchangeMethod" type="text" class="form-control" placeholder="请输入兑换方式">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <div class="btn btn-primary" onclick="addExchangeMethod();">确定</div>
                <div class="btn btn-default" data-dismiss="modal">取消</div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<!--公共js-->
<script src="/js/crm/common/common.js"></script>
<script src="/js/crm/common/input-tag.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script src="/js/crm/productManager/editProduct.js"></script>
</html>
